import axios from '../axios'

/*
 * 菜单管理模块
 */

// 保存
export const save = (data) => {
  return axios({
    url: '/api/sys/menu/add',
    method: 'post',
    data
  })
}
// 删除
export const batchDelete = (data) => {
  return axios({
    url: '/api/sys/menu/del',
    method: 'post',
    data
  })
}
// 查找导航菜单树
export const findNavTree = (params) => {
  return axios({
    url: '/api/sys/menu/findNavTree',
    method: 'get',
    params
  })
}
// 查找导航菜单树
export const findMenuTree = () => {
  return axios({
    url: '/menu/findMenuTree',
    method: 'get'
  })
}

// 查找导航菜单树
export const findPage = (data) => {
  return axios({
    url: '/api/sys/menu/page',
    method: 'post',
    data
  })
}
// 查找所有菜单
export const findList = (data) => {
  return axios({
    url: '/api/sys/menu/list',
    method: 'post',
    data
  })
}
